<font size="2" face="Tahoma"><b>Danh sách Thành viên</b></font>
<hr size="1" color="#cadadd" />
<div class="function">
	<a href="?act=member_new"><img src="images/add_new.gif" align="absmiddle" border="0" /></a> <a href="?act=member_new">Thêm mới</a>
</div>
<?
	if ($func == "del")
	{
		foreach ($tik as $id) {
			$user = new User();
			$user->select($id);
			$user->setstatus(User::$status_flag['DESACTIVE']);
			$user->update();
		}
		admin_load("Đã xóa các Username đã chọn.","?act=member_list");
		die();
	}
?>
<form action="?act=member_list" method="post" onsubmit="return confirm('Bạn có chắc chắn không ?');">
<input type="hidden" name="func" value="del" />
<table class="tb_table" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr class="tb_head">
	<td>STT</td>
	<td>Người dùng</td>
	<td>Họ tên</td>
	<td>Ngày lập</td>
	<td>Trạng thái</td>
	<td>Site Level</td>
	<td>Chỉnh sửa</td>
	<td>Xóa</td>
</tr>
<?php
$users = User::getAllUsers();
foreach ($users as $user) {
	$index++;
$authority_name = array(0 => 'ADMIN',
						1 => 'ĐỐI TÁC',
						2 => 'KHÁCH HÀNG',
						);
?>
	<tr class="tb_content">
	<td><?=$index?></td>
	<td><?=$user->getusername() ?></td>
	<td><?=$user->getname() ?></td>
	<td><?=lg_date::vn_time($user->getcreated_at())?></td>
	<td><?=$user->getstatus() == 1?"<img src=\"images/true.gif\" />":"<img src=\"images/false.gif\" />"?></td>
	<td><?=$authority_name[$user->getauthority()]?></td>
	<td><a href="?act=member_edit&id=<?=$user->getid()?>">Sửa</a></td>
	<td><input name="tik[]" type="checkbox" value="<?=$user->getid()?>" /></td>
</tr>
<?php } ?>
<tr class="tb_foot">
	<td colspan="7">&nbsp;</td>
	<td><input type="submit" value="Xóa" class="button_2" style="width:80%;" /></td>
</tr>
</table>
</form>
<div class="function">
	<a href="?act=member_new"><img src="images/add_new.gif" align="absmiddle" border="0" /></a> <a href="?act=member_new">Thêm mới</a>
</div>